import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'main',
    redirect: '/page1'
  },
  {
    path: '/page1',
    name: 'Page1',
    component: () => import('../views/page1/index.vue')
  }, {
    path: '/page2',
    name: 'Page2',
    component: () => import('../views/page2/index.vue')
  }, {
    path: '/page3',
    name: 'Page3',
    component: () => import('../views/page3/index.vue')
  }, {
    path: '/page4',
    name: 'Page4',
    component: () => import('../views/page4/index.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
